package com.usian.model.common.base;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.usian.model.common.dtos.ResponseResult;
import com.usian.model.common.enums.AppHttpCodeEnum;

public class BaseServiceImpl<M extends BaseMapper<T> , T> extends ServiceImpl<M,T> {

    protected ResponseResult paramError = ResponseResult.errorResult(AppHttpCodeEnum.PARAM_INVALID);//PARAM_INVALID(501,"无效参数"),
    protected ResponseResult paramSuccess = ResponseResult.errorResult(AppHttpCodeEnum.SUCCESS);//SUCCESS(0,"操作成功"),
    protected ResponseResult paramDataExist = ResponseResult.errorResult(AppHttpCodeEnum.DATA_NOT_EXIST);//DATA_NOT_EXIST(1002,"数据不存在"),
    protected ResponseResult paramRequire = ResponseResult.errorResult(AppHttpCodeEnum.PARAM_REQUIRE);//PARAM_REQUIRE(500,"缺少参数"),
    protected ResponseResult passwordError = ResponseResult.errorResult(AppHttpCodeEnum.LOGIN_PASSWORD_ERROR);//LOGIN_PASSWORD_ERROR(2,"密码错误"),
    public ResponseResult okResult = ResponseResult.errorResult(AppHttpCodeEnum.SUCCESS);//SUCCESS(0,"操作成功"),
    public ResponseResult serverError = ResponseResult.errorResult(AppHttpCodeEnum.SERVER_ERROR);//SERVER_ERROR(503,"服务器内部错误"),

}
